home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d21 / dvglue10.arc / TVINIT.C < prev    next >
C/C++ Source or Header  |  1988-08-13  |  2KB  |  48 lines

  1. /*=======================================================*/
  2. /*  TVINIT.C                                             */
  3. /*     initialize/exit TopView API interface             */
  4. /*                                                       */
  5. /*  (c) Copyright 1988 Ralf Brown  All Rights Reserved   */
  6. /*  May be freely copied for noncommercial use, so long  */
  7. /*  as this copyright notice remains intact, and any     */
  8. /*  changes are marked in the comment blocks preceding   */
  9. /*  functions.                                           */
  10. /*=======================================================*/
  11.  
  12. #include "tvapi.h"
  13.  
  14. /*=======================================================*/
  15.  
  16. OBJECT _TV_alloc_mutex_ = NIL ;
  17. OBJECT _TV_printf_mutex_ = NIL ;
  18.  
  19. /*=======================================================*/
  20. /* TVinit   initialize TopView API interface, and        */
  21. /*          return version (0 if DV not loaded)          */
  22. /*   Ralf Brown 6/8/88                                   */
  23. /*=======================================================*/
  24.  
  25. int pascal TVinit(void)
  26. {
  27.    _AX = 0x1022 ;
  28.    _BX = 0x0000 ;
  29.    geninterrupt(0x15) ;
  30.    return _BX ;
  31.    /* currently nothing else that needs to be done */
  32. }
  33.  
  34. /*=======================================================*/
  35. /* DVexit   exit TopView API interface                   */
  36. /*   Ralf Brown 4/23/88                                  */
  37. /*=======================================================*/
  38.  
  39. void pascal TVexit(void)
  40. {
  41.    if (_TV_alloc_mutex_)
  42.       _TV_object_free(_TV_alloc_mutex_) ;
  43.    if (_TV_printf_mutex_)
  44.       _TV_object_free(_TV_printf_mutex_) ;
  45. }
  46.  
  47. /* End of TVINIT.C */
  48.